home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Libraries
/
PlayerPRO 4.4.1
/
Filters Plugs
/
Bug 16bit Restore.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-16
|
1KB
|
61 lines
/*
Player PRO 4.15x PlugIns
Antoine ROSSET
16 Tranchees
1206 GENEVA
SWITZERLAND
FAX: 022 789 35 03
Compuserve: 100277,164
*/
#include "MAD.h"
#include "PPPlug.h"
#if defined(powerc) || defined(__powerc)
enum {
PlayerPROPlug = kCStackBased
| RESULT_SIZE(SIZE_CODE( sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof( Ptr*)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof( struct FileInstrData*)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof( long)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof( long)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof( PPInfoPlug*)))
};
ProcInfoType __procinfo = PlayerPROPlug;
#else
#include <A4Stuff.h>
#endif
OSErr main( Ptr *InstrumentPtr,
struct FileInstrData *theData,
long SelectionStart,
long SelectionEnd,
PPInfoPlug *thePPInfoPlug)
{
long i;
Ptr Sample8Ptr = *InstrumentPtr;
unsigned short *Sample16Ptr = (unsigned short*) *InstrumentPtr;
if( Sample8Ptr == 0L) return noErr;
switch( theData->amplitude)
{
case 8:
return noErr;
break;
case 16:
for( i = 0; i < theData->insSize; i++)
{
*Sample8Ptr -= 0x80;
Sample8Ptr++;
}
break;
}
return noErr;
}